Case 1004: TmpConstName = "WSANO_DATA or WSANO_ADDRESS": TmpErrDescription = "Valid name, no data record of requested type *OR* No address, look for MX record"
Case Else: TmpConstName = "": TmpErrDescription = "Unknown Error"
End Select
If Not IsMissing(ConstName) Then
ConstName = TmpConstName
End If
WSAErrDescription = TmpErrDescription
End Function
Public Function InternetErrDescription(Err As Long, Optional ByRef ConstName As Variant) As String
'~~~ A long description was not found for some of the error numbers,
'~~~ the constant name has been used in it place.
Dim TmpConstName As String, TmpErrDescription As String
Select Case Err
Case 80: TmpConstName = "": TmpErrDescription = "File Exists"
Case 87: TmpConstName = "": TmpErrDescription = "Bad or Missing Parameter"
Case 12001: TmpConstName = "ERROR_INTERNET_OUT_OF_HANDLES": TmpErrDescription = "No more handles could be generated at this time."
Case 12002: TmpConstName = "ERROR_INTERNET_TIMEOUT": TmpErrDescription = "The request has timed out."
Case 12003: TmpConstName = "ERROR_INTERNET_EXTENDED_ERROR": TmpErrDescription = "An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text."
Case 12004: TmpConstName = "ERROR_INTERNET_INTERNAL_ERROR ": TmpErrDescription = "An internal error has occurred. "
Case 12005: TmpConstName = "ERROR_INTERNET_INVALID_URL": TmpErrDescription = "The URL is invalid."
Case 12006: TmpConstName = "ERROR_INTERNET_UNRECOGNIZED_SCHEME": TmpErrDescription = "The URL scheme could not be recognized, or is not supported. "
Case 12007: TmpConstName = "ERROR_INTERNET_NAME_NOT_RESOLVED": TmpErrDescription = "The server name could not be resolved."
Case 12008: TmpConstName = "ERROR_INTERNET_PROTOCOL_NOT_FOUND": TmpErrDescription = "The requested protocol could not be located. "
Case 12009: TmpConstName = "ERROR_INTERNET_INVALID_OPTION": TmpErrDescription = "A request to InternetQueryOption or InternetSetOption specified an invalid option value."
Case 12010: TmpConstName = "ERROR_INTERNET_BAD_OPTION_LENGTH": TmpErrDescription = "The length of an option supplied to InternetQueryOption or InternetSetOption is incorrect for the type of option specified."
Case 12011: TmpConstName = "ERROR_INTERNET_OPTION_NOT_SETTABLE": TmpErrDescription = "The request option can not be set, only queried. "
Case 12012: TmpConstName = "ERROR_INTERNET_SHUTDOWN": TmpErrDescription = "The Win32 Internet function support is being shut down or unloaded."
Case 12013: TmpConstName = "ERROR_INTERNET_INCORRECT_USER_NAME ": TmpErrDescription = "The request to connect and log on to an FTP server could not be completed because the supplied user name is incorrect."
Case 12014: TmpConstName = "ERROR_INTERNET_INCORRECT_PASSWORD ": TmpErrDescription = "The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect."
Case 12015: TmpConstName = "ERROR_INTERNET_LOGIN_FAILURE ": TmpErrDescription = "The request to connect to and log on to an FTP server failed. "
Case 12016: TmpConstName = "ERROR_INTERNET_INVALID_OPERATION": TmpErrDescription = "The requested operation is invalid."
Case 12017: TmpConstName = "ERROR_INTERNET_OPERATION_CANCELLED": TmpErrDescription = "The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed."
Case 12018: TmpConstName = "ERROR_INTERNET_INCORRECT_HANDLE_TYPE ": TmpErrDescription = "The type of handle supplied is incorrect for this operation."
Case 12019: TmpConstName = "ERROR_INTERNET_INCORRECT_HANDLE_STATE": TmpErrDescription = "The requested operation cannot be carried out because the handle supplied is not in the correct state."
Case 12020: TmpConstName = "ERROR_INTERNET_NOT_PROXY_REQUEST": TmpErrDescription = "The request cannot be made via a proxy."
Case 12021: TmpConstName = "ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND": TmpErrDescription = "A required registry value could not be located."
Case 12022: TmpConstName = "ERROR_INTERNET_BAD_REGISTRY_PARAMETER": TmpErrDescription = "A required registry value was located but is an incorrect type or has an invalid value."
Case 12023: TmpConstName = "ERROR_INTERNET_NO_DIRECT_ACCESS": TmpErrDescription = "Direct network access cannot be made at this time."
Case 12024: TmpConstName = "ERROR_INTERNET_NO_CONTEXT": TmpErrDescription = "An asynchronous request could not be made because a zero context value was supplied."
Case 12025: TmpConstName = "ERROR_INTERNET_NO_CALLBACK": TmpErrDescription = "An asynchronous request could not be made because a callback function has not been set."
Case 12026: TmpConstName = "ERROR_INTERNET_REQUEST_PENDING": TmpErrDescription = "The required operation could not be completed because one or more requests are pending."
Case 12027: TmpConstName = "ERROR_INTERNET_INCORRECT_FORMAT": TmpErrDescription = "The format of the request is invalid."
Case 12028: TmpConstName = "ERROR_INTERNET_ITEM_NOT_FOUND": TmpErrDescription = "The requested item could not be located."
Case 12029: TmpConstName = "ERROR_INTERNET_CANNOT_CONNECT": TmpErrDescription = "The attempt to connect to the server failed."
Case 12030: TmpConstName = "ERROR_INTERNET_CONNECTION_ABORTED": TmpErrDescription = "The connection with the server has been terminated."
Case 12031: TmpConstName = "ERROR_INTERNET_CONNECTION_RESET": TmpErrDescription = "The connection with the server has been reset."
Case 12032: TmpConstName = "ERROR_INTERNET_FORCE_RETRY": TmpErrDescription = "Calls for the Win32 Internet function to redo the request."
Case 12033: TmpConstName = "ERROR_INTERNET_PROXY_REQUEST": TmpErrDescription = "ERROR_INTERNET_PROXY_REQUEST"
Case 12034: TmpConstName = "ERROR_INTERNET_NEED_UI": TmpErrDescription = "ERROR_INTERNET_NEED_UI"
Case 12036: TmpConstName = "ERROR_INTERNET_HANDLE_EXISTS": TmpErrDescription = "The request failed because the handle already exists."
Case 12037: TmpConstName = "ERROR_INTERNET_SEC_CERT_DATE_INVALID": TmpErrDescription = "ERROR_INTERNET_SEC_CERT_DATE_INVALID"
Case 12038: TmpConstName = "ERROR_INTERNET_SEC_CERT_CN_INVALID": TmpErrDescription = "ERROR_INTERNET_SEC_CERT_CN_INVALID"
Case 12039: TmpConstName = "ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR": TmpErrDescription = "ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR"
Case 12040: TmpConstName = "ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR": TmpErrDescription = "ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR"
Case 12041: TmpConstName = "ERROR_INTERNET_MIXED_SECURITY": TmpErrDescription = "Indicates that the content is not entirely secure. Some of the content being viewed may have come from unsecured servers."
Case 12042: TmpConstName = "ERROR_INTERNET_CHG_POST_IS_NON_SECURE": TmpErrDescription = "ERROR_INTERNET_CHG_POST_IS_NON_SECURE"
Case 12043: TmpConstName = "ERROR_INTERNET_POST_IS_NON_SECURE": TmpErrDescription = "ERROR_INTERNET_POST_IS_NON_SECURE"
Case 12044: TmpConstName = "ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED": TmpErrDescription = "ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED"
Case 12045: TmpConstName = "ERROR_INTERNET_INVALID_CA": TmpErrDescription = "ERROR_INTERNET_INVALID_CA"
Case 12046: TmpConstName = "ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP": TmpErrDescription = "Client authorization is not set up on this computer"
Case 12047: TmpConstName = "ERROR_INTERNET_ASYNC_THREAD_FAILED": TmpErrDescription = "ERROR_INTERNET_ASYNC_THREAD_FAILED"
Case 12048: TmpConstName = "ERROR_INTERNET_REDIRECT_SCHEME_CHANGE": TmpErrDescription = "ERROR_INTERNET_REDIRECT_SCHEME_CHANGE"
Case 12110: TmpConstName = "ERROR_FTP_TRANSFER_IN_PROGRESS": TmpErrDescription = "The FTP operation was not completed because the session was aborted."